package com.itheima.afternoon;

public class demo01 {
    public static void main(String[] args) throws ClassNotFoundException {
        //1.用Class类中的静态方法forName
        //全类名：包名+类名
        Class clazz1 = Class.forName("com.itheima.afternoon.Student");
        System.out.println(clazz1);
        //2.通过Class属性来获取
        Class clazz2 = Student.class;
        System.out.println(clazz2);
        Student stu = new Student();
        //3.用对象的getClass来获取
        Class clazz3 = stu.getClass();
        System.out.println(clazz3);
        System.out.println(clazz1 == clazz2);
        System.out.println(clazz2 == clazz3);
    }
}
